﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'GetProveedorByKeyWord')
	BEGIN
		DROP  Procedure  GetProveedorByKeyWord
	END

GO

CREATE Procedure GetProveedorByKeyWord

	(
		@nombre varchar(20)
	)


AS
begin
SELECT
	[proveedor].[Contacto] AS 'Contacto',
	[proveedor].[Direccion] AS 'Direccion',
	[proveedor].[Email] AS 'Email',
	[proveedor].[IdProveedor] AS 'IdProveedor',
	[proveedor].[RazonSocial] AS 'RazonSocial',
	[proveedor].[Ruc] AS 'Ruc',
	[proveedor].[Telefono] AS 'Telefono',
	[proveedor].[TipoProveedor] AS 'TipoProveedor'
FROM [dbo].[Proveedor] [proveedor]
where [proveedor].[RazonSocial] like @nombre +'%'
end

GO


GRANT EXEC ON GetProveedorByKeyWord TO PUBLIC

GO


